//
//  ZXVisitorView.swift
//  PandaEye_Weibo
//
//  Created by Xuan Zhang on 16/6/15.
//  Copyright © 2016年 Xuan Zhang. All rights reserved.
//

import UIKit

class ZXVisitorView: UIView {
    //图标
    lazy var iconView:UIImageView  = UIImageView()
    //转圈图片
    lazy var circleView:UIImageView  = UIImageView()
    //遮罩图片
    lazy var maskIconView:UIImageView  = UIImageView()
    //文字Label
    lazy var textLabel:UILabel  = UILabel()
    //注册按钮
    lazy var registButton:UIButton  = UIButton()
    //登录按钮
    lazy var loginButton:UIButton  = UIButton()
    init(){
        super.init(frame: UIScreen.mainScreen().bounds)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
}

extension ZXVisitorView {
    private func setupUI(){
        self.backgroundColor = UIColor.blackColor()
        //添加控件
        addSubview(iconView)
        addSubview(circleView)
        addSubview(maskIconView)
        addSubview(textLabel)
        addSubview(registButton)
        addSubview(loginButton)
        
        //给子控件添加默认值
        iconView.image = UIImage(named: "visitordiscover_feed_image_house")
        circleView.image = UIImage(named:"visitordiscover_feed_image_smallicon")
        maskIconView.image =  UIImage(named:"visitordiscover_feed_mask_smallicon")
        textLabel.text = "登录后,别人评论你的微博,给你发送消息,你都会收到"
        registButton.setTitle("注册", forState: .Normal)
        //        registButton.setBackgroundImage([], forState: .Normal)
        loginButton.setTitle("登录", forState: .Normal)
        
    }
}

